// GalconServer.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"
#include "GalconServer.h"

int _tmain(int argc, _TCHAR* argv[])
{
   if (argc != 2)
   {
      std::cerr << "Usage: Server port";
      return 1;
   }

   try
   {
      boost::asio::io_service io_service;

      tcp::endpoint endpoint(tcp::v4(), _wtoi(argv[1]));

      GalconServer server(io_service, endpoint);

      io_service.run();
   }
   catch (std::exception& e)
   {
      std::cerr << e.what();
      return 1;
   }

	return 0;
}

